﻿<Window x:Class="Sample.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Пример работы с Quik" Height="190" Width="460">
    <Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="100" />
			<ColumnDefinition Width="100" />
			<ColumnDefinition Width="100" />
			<ColumnDefinition Width="100" />
            <ColumnDefinition Width="2*" />
        </Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="25" />
			<RowDefinition Height="10" />
			<RowDefinition Height="20" />
			<RowDefinition Height="20" />
            <RowDefinition />
        </Grid.RowDefinitions>
		<Label Grid.Column="0" Grid.Row="0" Content="Путь к Quik:" />
		<TextBox x:Name="Path" Text="" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" />
		<Button x:Name="FindPath" Grid.Column="4" Grid.Row="0" Content="..." Width="25" HorizontalAlignment="Left" Click="FindPathClick" />
		
		<!--<Button x:Name="ConnectBtn" Background="LightPink" Grid.Column="0" Grid.Row="2" Content="Подключиться" Click="ConnectClick" />
		<Button x:Name="ShowSecurities" Grid.Column="1" Grid.Row="2" IsEnabled="False" Content="Инструменты..." Click="ShowSecuritiesClick" />
		<Button x:Name="ShowPortfolios" Grid.Column="2" Grid.Row="2" IsEnabled="False" Content="Портфели..." Click="ShowPortfoliosClick" />
		<Button x:Name="ShowStopOrders" Grid.Column="3" Grid.Row="2" IsEnabled="False" Content="Стоп-заявки..." Click="ShowStopOrdersClick" />
		
		<Button x:Name="ExportDde" Background="LightPink" Grid.Column="0" Grid.Row="3" IsEnabled="False" Content="Экспорт DDE" Click="ExportDdeClick" />
		<Button x:Name="ShowTrades" Grid.Column="1" Grid.Row="3" IsEnabled="False" Content="Сделки..." Click="ShowTradesClick" />
		<Button x:Name="ShowMyTrades" Grid.Column="2" Grid.Row="3" IsEnabled="False" Content="Мои сделки..." Click="ShowMyTradesClick" />
		<Button x:Name="ShowOrders" Grid.Column="3" Grid.Row="3" IsEnabled="False" Content="Заявки..." Click="ShowOrdersClick" />-->
    
        <Menu Grid.ColumnSpan="4" Grid.Row="4" Height="30" HorizontalAlignment="Left" Margin="0,16,0,0" Name="menu1" VerticalAlignment="Top" Width="400" >

        <!--<Menu Height="22" HorizontalAlignment="Left" Margin="10,10,0,0" Name="MainMenu" VerticalAlignment="Top" Width="241" FontSize="13" FontWeight="Bold" FontStyle="Normal" FontStretch="UltraExpanded">-->
            <MenuItem Header="Подключиться"  Width="100">
                <MenuItem Header="Quik"  Name ="ConnectBtn" Click="ConnectClick" />
                <MenuItem Header="Export DDE" Name="ExportDde"  IsEnabled="False" Click="ExportDdeClick" >
                </MenuItem>
            </MenuItem>
            <MenuItem Header="Моя Информация" Width="100">
                <MenuItem Header="Заявки">
                    <MenuItem Header="Лимит-заявки" Name="ShowOrders" IsEnabled="False" Click="ShowOrdersClick" />
                    <MenuItem Header="Стоп-заявки" Name="ShowStopOrders" IsEnabled="False" Click="ShowStopOrdersClick" />
                </MenuItem>
                <MenuItem Header="Портфели" Name="ShowPortfolios" IsEnabled="False" Click="ShowPortfoliosClick" />
                <MenuItem Header="Позиции" Name="ShowPositions" IsEnabled="False" Click="ShowPositionsClick" />
                <MenuItem Header="Мои сделки" Name="ShowMyTrades" IsEnabled="False" Click="ShowMyTradesClick"/>
            </MenuItem>
            <MenuItem Header="Информация" Width="100">
                <MenuItem Header="Инструменты" Name="ShowSecurities" IsEnabled="False" Click="ShowSecuritiesClick" />
                <MenuItem Header="Сделки" Name="ShowTrades" IsEnabled="False" Click="ShowTradesClick" />
            </MenuItem>
            <MenuItem Header="My Robots" Width="90" Click="RobotMenu_Click">
                <MenuItem Header="StartTrading"/>
                <MenuItem Header="StartTesting"/>
            </MenuItem>
        </Menu>
    </Grid>
</Window>
